package com.ylc.jwtdemo.service.Imp;

import com.ylc.jwtdemo.Utils.JwtUtils;
import com.ylc.jwtdemo.dao.UserDao;
import com.ylc.jwtdemo.entity.User;
import com.ylc.jwtdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserServiceImpI implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User login(User user) {
        User userdb=userDao.login(user);
        if(userdb!=null)
        {
            return userdb;
        }
        throw  new RuntimeException("登录失败");
    }
}
